import request from '@/utils/request';

// 用户管理相关API
export const userApi = {
  // 列表查询
  list: (params) => request.get('/SystemUser/list', { params }),
  // 新增用户
  add: (data) => request.post('/SystemUser/add', data),
  // 更新用户
  update: (data) => request.put('/SystemUser/update', data),
  // 删除用户
  delete: (id) => request.delete('/SystemUser/delete', { params: { id } }),
  // 更新密码
  updatePassword: (data) => request.put('/SystemUser/updatepassword', data),
  // 绑定角色
  addRole: (data) => request.post('/SystemUser/addrole', data),
  // 绑定部门
  addDept: (data) => request.post('/SystemUser/adddept', data)
};

export default userApi;